Question 1

Which items should be visible in the menu with the selected categories, “Drinks” and “Mains” ?

{ 
  "menu": [
    {
      "name": "Greek Salad",
      "category": “starters”,
    },
    {
      "name": "Bruschetta",
      "category": “starters”,
    },
    {
      "name": "Grilled Fish",
     "category": “mains”,
    },
    {
      "name": "Pasta",
      "category": “mains”,
    },
    {
      "name": "Lemon Dessert",
      "category": “desserts”,
    }
  ]
}


Question 2

You have implemented the banner component that contains a search bar widget. This search bar allows you to perform pattern matching. In other words, it filters dishes names that include the characters typed in. Suppose you have typed the query “t” and the next categories are selected: “Starters” and “Desserts” . Which menu items are visible?